package teaching.mapper;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.mapstruct.Mapper;
import org.springframework.stereotype.Repository;
import teaching.pojo.CourseStudent;

import java.util.List;

/**
 * Author:20201002983_郑雨蓓
 * Date: 2024/3/9
 * Description:
 */
@Mapper
@Repository
public interface CourseStudentMapper {
    @Select("select * from course_student where cid=#{cid}")
    List<CourseStudent> listByCourse(@Param("cid") Long cid);

    @Delete("delete from course_student where cid = #{cid}")
    int delete(Long cid);
}
